Fix resetting keyboard hook state on MS-Windows
authorRaffael Stocker <r.stocker@mnet-mail.de>
Mon, 4 Mar 2024 18:06:07 +0000 (19:06 +0100)
committerEli Zaretskii <eliz@gnu.org>
Thu, 14 Mar 2024 08:01:06 +0000 (10:01 +0200)
commite7b1743b798cab338e0fa7b98dfb20c0ba7204b1
tree20f0ac8ef16258964c66b4f8f1a907f1263d3ef9
parent1b94f800ae34de5f4e72682a81de1d42bdda9276
Fix resetting keyboard hook state on MS-Windows

Register session notifications so Emacs is notified when the
computer is being locked, as required to reset the low level
keyboard hook state.  (Bug#69083).
* src/w32term.h:
* src/w32fns.c (setup_w32_kbdhook, remove_w32_kbdhook)
(w32_wnd_proc, globals_of_w32fns, maybe_pass_notification):
Register and manage session notifications in GUI Emacs.
* src/w32console.c (initialize_w32_display, find_ime_window):
* src/w32xfns.c (drain_message_queue): Register notifications
and reset keyboard hook state in console Emacs.
* src/w32.c (term_ntproc): Un-register session notifications
when terminating.
src/w32.c
src/w32console.c
src/w32fns.c
src/w32term.h
src/w32xfns.c